import {
  Form,
  Field,
  Button,
  NavBar,
  Toast,
  Tabbar,
  TabbarItem,
  Search,
  Swipe,
  SwipeItem,
  Grid,
  GridItem,
  PullRefresh,
  List,
  Tag,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Cell,
  CellGroup,
  TreeSelect,
  Checkbox,
  CheckboxGroup,
  Card,
  SwipeCell,
  SubmitBar,
  ImagePreview,
  Lazyload,
  Icon,
  Stepper,
  Empty
} from 'vant'

const Vant = {
  install: Vue => {
    Vue.use(Form)
    Vue.use(Field)
    Vue.use(Button)
    Vue.use(NavBar)
    Vue.use(Toast)
    Vue.use(Tabbar)
    Vue.use(TabbarItem)
    Vue.use(Search)
    Vue.use(Swipe)
    Vue.use(SwipeItem)
    Vue.use(Grid)
    Vue.use(GridItem)
    Vue.use(PullRefresh)
    Vue.use(List)
    Vue.use(Tag)
    Vue.use(GoodsAction)
    Vue.use(GoodsActionIcon)
    Vue.use(GoodsActionButton)
    Vue.use(Cell)
    Vue.use(CellGroup)
    Vue.use(TreeSelect)
    Vue.use(Checkbox)
    Vue.use(CheckboxGroup)
    Vue.use(Card)
    Vue.use(SwipeCell)
    Vue.use(SubmitBar)
    Vue.use(ImagePreview.Component)
    Vue.use(Icon)
    Vue.use(Stepper)
    Vue.use(Empty)
    Vue.use(Lazyload, {
      lazyComponent: true,
      loading:
        'https://ts1.cn.mm.bing.net/th/id/R-C.b712f0ec26dfb72f3606661b71244192?rik=C%2f7Ce6k0IrpEdQ&riu=http%3a%2f%2fbpic.588ku.com%2felement_pic%2f01%2f35%2f05%2f48573bcfb180121.jpg&ehk=CGg%2fHbpUcU13sS4ib8J4fMEehcSRHuQBT64LEVaZukY%3d&risl=&pid=ImgRaw&r=0',
      error:
        'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png'
    })
  }
}

export default Vant
